0 CpxTRS
↳1 DependencyGraphProof (BOTH BOUNDS(ID, ID), 0 ms)
↳2 CpxTRS
↳3 TrsToWeightedTrsProof (BOTH BOUNDS(ID, ID), 0 ms)
↳4 CpxWeightedTrs
↳5 TypeInferenceProof (BOTH BOUNDS(ID, ID), 0 ms)
↳6 CpxTypedWeightedTrs
↳7 CompletionProof (UPPER BOUND(ID), 0 ms)
↳8 CpxTypedWeightedCompleteTrs
↳9 CpxTypedWeightedTrsToRntsProof (UPPER BOUND(ID), 0 ms)
↳10 CpxRNTS
↳11 CompleteCoflocoProof (⇔, 44 ms)
↳12 BOUNDS(1, 1)
h(c(x, y), c(s(z), z), t(w)) → h(z, c(y, x), t(t(c(x, c(y, t(w))))))
h(x, c(y, z), t(w)) → h(c(s(y), x), z, t(c(t(w), w)))
h(c(s(x), c(s(0), y)), z, t(x)) → h(y, c(s(0), c(x, z)), t(t(c(x, s(x)))))
t(t(x)) → t(c(t(x), x))
t(x) → x
t(x) → c(0, c(0, c(0, c(0, c(0, x)))))
t(x) → c(0, c(0, c(0, c(0, c(0, x)))))
t(x) → x
t(x) → c(0, c(0, c(0, c(0, c(0, x))))) [1]
t(x) → x [1]
t(x) → c(0, c(0, c(0, c(0, c(0, x))))) [1]
t(x) → x [1]
t :: c → c c :: 0 → c → c 0 :: 0 |
const
Runtime Complexity Weighted TRS with Types. The TRS R consists of the following rules:
The TRS has the following type information:
Rewrite Strategy: INNERMOST |
0 => 0
const => 0
t(z) -{ 1 }→ x :|: x >= 0, z = x
t(z) -{ 1 }→ 1 + 0 + (1 + 0 + (1 + 0 + (1 + 0 + (1 + 0 + x)))) :|: x >= 0, z = x
eq(start(V),0,[t(V, Out)],[V >= 0]). eq(t(V, Out),1,[],[Out = 5 + V1,V1 >= 0,V = V1]). eq(t(V, Out),1,[],[Out = V2,V2 >= 0,V = V2]). input_output_vars(t(V,Out),[V],[Out]). |
CoFloCo proof output:
Preprocessing Cost Relations
=====================================
#### Computed strongly connected components
0. non_recursive : [t/2]
1. non_recursive : [start/1]
#### Obtained direct recursion through partial evaluation
0. SCC is partially evaluated into t/2
1. SCC is partially evaluated into start/1
Control-Flow Refinement of Cost Relations
=====================================
### Specialization of cost equations t/2
* CE 4 is refined into CE [5]
* CE 3 is refined into CE [6]
### Cost equations --> "Loop" of t/2
* CEs [5] --> Loop 4
* CEs [6] --> Loop 5
### Ranking functions of CR t(V,Out)
#### Partial ranking functions of CR t(V,Out)
### Specialization of cost equations start/1
* CE 2 is refined into CE [7,8]
### Cost equations --> "Loop" of start/1
* CEs [7,8] --> Loop 6
### Ranking functions of CR start(V)
#### Partial ranking functions of CR start(V)
Computing Bounds
=====================================
#### Cost of chains of t(V,Out):
* Chain [5]: 1
with precondition: [V+5=Out,V>=0]
* Chain [4]: 1
with precondition: [V=Out,V>=0]
#### Cost of chains of start(V):
* Chain [6]: 1
with precondition: [V>=0]
Closed-form bounds of start(V):
-------------------------------------
* Chain [6] with precondition: [V>=0]
- Upper bound: 1
- Complexity: constant
### Maximum cost of start(V): 1
Asymptotic class: constant
* Total analysis performed in 19 ms.